1. Field of the Invention
The present invention relates generally to Extensible Markup Language (XML), and in particular, to a method, apparatus, and article of manufacture for using and processing redline or markup documents based on an XML schema.
2. Description of the Related Art
The internet is widely utilized to transmit and receive information in the form of web pages that are translated/interpreted and displayed by a web browser on a computer. Document definition languages are interpreted by a web browser and define how a document or information is to be displayed in the browser. Further, sets of rules, referred to as schemas, may provide for a particular structure of information. For example, an address schema may comprise constraints and limitations as to the order and sequence of elements and datatypes that define an address.
Computer graphics programs such as AutoCAD(copyright) permit users to redline or markup drawings. The redlines/markups may be stored in a file separate from the original drawing. Further, the redlines/markups may be transmitted across the internet and viewed/utilized by other users. However, the format and structure of redline/markup files may differ depending on the application utilized. Consequently, a consistent structure/schema that is utilized regardless of the application is desirable. The prior art does not provide for a redline or markup schema. These problems may be better understood by describing document definition languages and schemas.
So that a browser can interpret and display a web page, document definition languages and standard programming languages are utilized to define the web page. For example, hypertext markup language (HTML) is widely used to define web pages. However, HTML utilizes a predefined set of xe2x80x9ctagsxe2x80x9d to describe elements on the web page. As a result, extensible markup language (XML) has become and is becoming more widely used on the internet. XML is more flexible than HTML and allows tags to be defined by the developer of the web page. Thus, tags for virtually any data items such as product, sales rep and amount due, can be used for specific applications, allowing web pages to function like database records.
XML provides a fairly complete set of tools for describing the parts of a document (elements), annotating those parts (attributes), and constraining the parts that can appear within the elements and attributes (content models and attribute types). Schemas use declarations to describe rules and constraints for elements and attributes, building a framework for documents out of a fairly small set of declarations. Declarations create a vocabulary and a set of constraints, identifying content and where it is to appear. Many schemas can be built using only a combination of element and attribute declarations, while other declarations (like entities and notations) can supplement these core declarations when needed in a particular situation.
Elements and attributes are the core structures of XML, the key features with which document content is built and annotated. Elements and attributes xe2x80x98mark upxe2x80x99 text into easily processed segments, labeled for identification. XML schemas describe the structure of those labels and identify (with varying degrees of precision) the material they may contain. Both elements and attributes may be used to contain simple data types, from basic text types to the sophisticated and complex data types proposed in XML-Data and other schema proposals. Only elements may contain structured content, storing elements within elements and defining potentially complex structure.
Elements and attributes have a number of key differences. Attributes cannot hold subcomponentsxe2x80x94no child elements or attributes are allowed within an element. An application can still parse the content within an attribute value into smaller components, if it wants, but XML itself doesn""t provide that facility. Attributes are always assigned to particular elements, while elements can appear inside of any other element as a child element if that element permits it. Attribute values can be set through default or fixed values set in the schema. Elements may have to contain certain other elements or text, but the actual value of that content cannot be fixed from the schema.
Attributes tend to be simpler, typically holding less (though often just as important) information that annotates an element. In general, elements annotate the content of a document, and attributes annotate elements. In practice, the limitations of attributes do restrict their use to some extent, although their ability to have defaults sometimes leads to their use in place of elements.
Schemas can constrain content for elements and attributes, requiring that the content within them meet certain criteria. In addition to identifying attribute types, attribute type declarations include a default declaration for each attribute. Default values allow schema developers to provide values for attributes, require that document authors provide values, or fix the value permanently. This makes it much easier to ensure that information appears when it should without requiring an enormous amount of extra markup within documents.
Thus, as described above, a schema is a model for describing the structure of information. An XML schema describes a model for a whole class of documents. The model describes the possible arrangement of tags and text in a valid document. A schema may also be viewed as an agreement on a common vocabulary for a particular application that involves exchanging documents. In schemas, models are described in terms of constraints. A constraint defines what can appear in any given context. As described, there are basically two kinds of constraints: content model constraints and datatype or attribute constraints. Content model constraints describe the order and sequence of elements and datatype or attribute constraints describe valid units of data.
For example, a schema might describe a valid  less than address greater than  with the content model constraint that it consist of a  less than name greater than  element, followed by one or more  less than street greater than  elements, followed by exactly one  less than city greater than ,  less than state greater than , and  less than zip greater than  element. The content of a  less than zip greater than  might have a further datatype or attribute constraint that it consist of either a sequence of exactly five digits or a sequence of five digits, followed by a hyphen, followed by a sequence of exactly four digits. No other text is a valid zip code. Once a schema is defined, documents may be interpreted or parsed in accordance with the schema. If the parsed document adheres to all of the specified constraints, the document is xe2x80x9cvalidxe2x80x9d. If the document does not adhere to all of the specified constraints, the document is invalid. The ability to test the validity of document is an important aspect of large web applications that are receiving and sending information to and from lots of sources. If a server is receiving XML transactions over the web, it is undesirable to process the content into a database if the information received is not in the proper format/schema.
Thus, although redline/markup documents are available in various applications and XML is becoming widely utilized, the prior art does not provide for a redline/markup schema.
A method, apparatus, and article of manufacture for processing RedlineXML documents. One or more embodiments of the invention provide a RedlineXML schema comprised of constraints for RedlineXML documents. The constraints provide restrictions as to the elements and attributes that may be utilized to define a RedlineXML document. The RedlineXML schema defines the RedlineMarkup element as its xe2x80x98rootxe2x80x99 node. The RedlineMarkup node is comprised of a BaseDocument element, a MarkupPlanes element, a Tags element, and an Objects element. The Objects element is comprised of any number of specific elements that may be utilized to redline or markup another document (referred to as the base document). For example, the Objects element may contain Box, Circle, Ellipse, Spline, Polyline, Group, Arc, Text, Cloud, Note, Callout, and/or Style elements. Each of the Objects elements may then be further constrained to specific attributes, datatypes, or values. The BaseDocument element specifies the name of the document that is being redlined or marked up (the base document), the system required to parse and display the specific base document type, and the name of the foreign element within the RedlineXML document that contains information about how to display the base document. For example, if the BaseDocument element specifies a drawing, URLs for the locations of the schema (for the drawing) and the drawing will be specified, as well as an identification of the system required to parse the elements defined by the schema.
To utilize the RedlineXML schema, a RedlineXML document that references the RedlineXML schema is obtained. A determination is made regarding whether the RedlineXML document complies with the constraints specified in the RedlineXML schema. If the document complies, the document is determined to be valid and is processed by a redline processor that is capable of reading the RedlineXML document and displaying the appropriate results. For example, the redline processor may comprise a graphics program that reads the RedlineXML document and displays the specified redline objects on the base document retrieved from the location specified in the RedlineXML document. If the RedlineXML document is invalid, the valid portions may be processed or the entire document may be rejected.